<?php
include("_mysql.php");
include("_settings.php");
include("_functions.php");

$json_result = array();

	
$result =  mysql_query("SELECT orders_bets.*, category.name As name  FROM orders_bets LEFT JOIN category ON orders_bets.category = category.id ORDER BY orders_bets.id DESC LIMIT 0,1")  or die(mysql_error());
if ($result) {
	$item = mysql_fetch_assoc($result);
	$json_result["id"] = $item["id"];
	$json_result["content"] = <<<EOD
				<li class="clearafter" id="{$item["id"]}">
		                        			<div class="left">
		                        				<a href="#"><img src="{$item["image"]}" /></a>
		                        				<div class="latest-gigs-price content-center">\${$item["price"]}</div>
		                        			</div>
		                        			<div class="right">
		                        				<p class="description">{$item["title"]}</p>
		                        				<div class="catname content-right"><a href="#">{$item["name"]}</a></div>
		                        			</div>
		                        		</li>
EOD;
	
}

echo json_encode($json_result);
?>